home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10013 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: electra.saaf.se!not-for-mail
  2. From: pausch@electra.saaf.se (Paul Schlyter)
  3. Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
  4. Subject: Re: Access carry flag from C
  5. Date: 5 Mar 1996 17:19:17 +0100
  6. Organization: Svensk Amat|rAstronomisk F|rening
  7. Message-ID: <4hhpi5$a98@electra.saaf.se>
  8. References: <Dn1C9z.DGv.0.net@indra.com> <TANMOY.96Feb23101510@qcd.lanl.gov> <313178D5.41C6@bazis.nl> <4gvdfv$bp7@doc.armltd.co.uk>
  9. NNTP-Posting-Host: electra.saaf.se
  10.  
  11. In article <4gvdfv$bp7@doc.armltd.co.uk>,
  12. David Seal <dseal@armltd.co.uk> wrote:
  13. Article: 1549 of comp.arch.arithmetic
  14.  
  15. > Franz Korntner <fkorntne@bazis.nl> writes:
  16. > There are three values to consider from the standard:
  17. > (1) +32767
  18. > (2) INT_MAX (or to be completely precise, the constant expression that
  19. >     INT_MAX is expanded to by the preprocessor).
  20. > (3) The maximum value that the implementation allows a variable of
  21. >     type "int" to take before undefined behaviour occurs.
  22. > As you say, the standard says that +32767 is the smallest value that
  23. > INT_MAX may be - i.e. that value (1) <= value (2). But as Tanmoy
  24. > Bhattacharya points out, it *also* says that value (2) is *equal* to
  25. > value (3). In short, the requirements imposed by the standard are:
  26. >   Value (1) < Value (2) = Value (3)
  27.  
  28. A minor correction: the requirements imposed by the standard are:
  29.  
  30.    Value (1) <= Value (2) = Value (3)
  31.  
  32. i.e. +32767 is a legal value of INT_MAX
  33.  
  34. -- 
  35. ----------------------------------------------------------------
  36. Paul Schlyter,  Swedish Amateur Astronomer's Society (SAAF)
  37. Grev Turegatan 40,  S-114 38 Stockholm,  SWEDEN
  38. e-mail:  pausch@saaf.se        psr@home.ausys.se
  39.